package com.youthburin.rmp.util;

import org.apache.shiro.crypto.hash.Md5Hash;

public class PasswordUtils {
	// 初始密码都设置为888888
	private static final String INITIAL_PASSWORD = "888888";

	public static String getEncodePassword(String salt, String password) {
		Md5Hash md5Hash = new Md5Hash(password, salt, 1024);
		return md5Hash.toBase64();
	}

	public static String getEncodeInitailPassword(String salt) {
		return getEncodePassword(salt, INITIAL_PASSWORD);
	}
}
